package project;

public class Main {

    public static void main(String[] args) {
        java.util.Scanner sc = new java.util.Scanner(System.in);
        System.out.print("请输入您的月工资:");
        int num = sc.nextInt();

        int n = 0;
        int o = 0;

        int ny = num - 5000;
        int oy = num - 3500;

        if (ny <= 0) {
            n = (int) (0);
        } else if (ny <= 3000) {
            n = (int) (ny * 0.03);
        } else if (ny <= 12000) {
            n = (int) (ny * 0.1 - 210);
        } else if (ny <= 25000) {
            n = (int) (ny * 0.2 - 1410);
        } else if (ny <= 35000) {
            n = (int) (ny * 0.25 - 2660);
        } else if (ny <= 55000) {
            n = (int) (ny * 0.3 - 4410);
        } else if (ny <= 80000) {
            n = (int) (ny * 0.35 - 7160);
        } else {
            n = (int) (ny * 0.45 - 15160);
        }


        if (oy <= 0) {
            o = (int) (0);
        } else if (oy <= 1500) {
            o = (int) (oy * 0.03);
        } else if (oy <= 4500) {
            o = (int) (oy * 0.1 - 105);
        } else if (oy <= 9000) {
            o = (int) (oy * 0.2 - 555);
        } else if (oy <= 35000) {
            o = (int) (oy * 0.25 - 1005);
        } else if (oy <= 55000) {
            o = (int) (oy * 0.3 - 2755);
        } else if (oy <= 80000) {
            o = (int) (oy * 0.35 - 5505);
        } else {
            o = (int) (oy * 0.45 - 13505);
        }
        System.out.println("旧税率需要交税" + o);
        System.out.println("新税率需要交税" + n);
        System.out.println("新旧税率交税差值" + (o - n));
    }
}
